package com.ggk911.pharmacy_system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 药品销售单
 *
 * @author ggk-911
 * @version 1.0 2023/4/13 9:51
 */
@TableName("drug_sale")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DrugSale {
    @TableId(value = "drug_sale_id", type = IdType.AUTO)
    private Integer drugSaleId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date drugSaleCreateTime;

    private Integer userId;

    @TableField(exist = false)
    private User user;
}
